﻿
namespace WeixinSDK
{
    public class WxError
    {
        /// <summary>
        /// 错误代码
        /// </summary>
        [Newtonsoft.Json.JsonIgnore]
        public int errcode { get; set; }
        /// <summary>
        /// 错误信息
        /// </summary>
        [Newtonsoft.Json.JsonIgnore]
        public string errmsg { get; set; }

        /// <summary>
        /// 获取是否存在错误
        /// </summary>
        [Newtonsoft.Json.JsonIgnore]
        public bool HasError
        {
            get { return errcode != 0; }
        }

        /// <summary>
        /// 原始的Json
        /// </summary>
        [Newtonsoft.Json.JsonIgnore]
        public string OriginalJson { get; set; }

        public override string ToString()
        {
            return OriginalJson;
        }
    }
}
